﻿using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Runtime.Serialization;
using System.Xml.Serialization;

namespace WCF.Common.Navigation
{
    /// <summary>表示一个组件导航目录结构对象。</summary>
    /// <remarks></remarks>
    [DataContract(Namespace = Constrons.NameSpace)]
    public class NavDirectory : NavigationBase
    {
        /// <summary>
        /// 构造一个组件导航目录结构对象实例。
        /// </summary>
        public NavDirectory()
        {
            SubNotes = new ObservableCollection<NavigationBase>();
        }
        /// <summary>
        /// 本标签下级允许的标签有NavUISLXap、NavUIBRef、NavUISLAssembly、NavDirectory
        /// <para>目前仅支持NavUISLXap，NavDirectory</para>
        /// <para>注意：每个SubNotes 下的所有标签的目录与目录、公共能与功能Caption 是不可重复的，否则会报错或忽略</para>
        /// </summary>
        [DataMember]
        [XmlArrayItem("UISLXap", typeof(NavUISLXap))
        , XmlArrayItem("Directory", typeof(NavDirectory))]
        public ObservableCollection<NavigationBase> SubNotes { get; set; }
    }
}